1. Field of the Invention
The present invention relates to an auto white balancing apparatus for use in electronic still cameras, video cameras or the like.
2. Description of the Related Art
Video cameras and digital still cameras have employed auto white balancing adjustment with the aim of reproducing a white subject so that it looks white. Conventional well-known auto white balancing methods include adjusting the balance of RGB components (the three primary color components consisting of red, green and blue) of each pixel signal in order to render the average of the entire image into an achromatic color. This method, however, has entailed a drawback that improper white balancing adjustment may often be made in the case where chromatic colors occupy the major part of an image.
Such improper white balancing adjustment is called a color failure. Known as the auto white balance adjusting method for alleviating this color failure is a technique disclosed in Japan Patent Laid-open Pub. No. Hei 5-292533. In this technique, the image is split into a plurality of blocks, the RGB average values of each block are derived, and only those blocks are extracted whose average values lie in predetermined ranges. Adjustment of the RGB components is then made so as to ensure that the RGB average values of the thus extracted blocks result in an achromatic color.
Although these methods have presented an effect in the case of the presence of a limited number of light sources lighting a subject, they have failed to provide a sufficient white balancing adjustment in the event of being lighted by an unassumed light source or of simultaneous lighting by a plurality of different light sources.
The applicant has thus proposed an improved auto white balance adjuster disclosed in Japan Patent Laid-open Pub. No. Hei 8-289314. The adjuster splits an image into a plurality of blocks and extracts a block group judged to represent a white object photographed under a fluorescent light, a block group judged to represent the white object photographed under the sunlight or tungsten light, and a block group having a color closer to the brightest block within the image. The average value of each of the RGB components is then figured out for each block group, and the average values are intermingled with one another in compliance with a predefined rule so that the resultant value is used as the white balance adjustment signal. This adjuster allows the RGB average values of the block group of color closer to the brightest block within the image to reflect on the white balance signal, whereupon a proper white balance adjustment can be made even under the unassumed light source or under a plurality of different light sources.
The above conventional method has suffered from a problem that the white balance behavior is apt to become unstable due to the change of the photographed scenes since use is made of the result of binary discrimination of whether the average values of the color difference of each block lie in a region (light source region) fixedly defined for each light source. For example, a slight change in the photographed scene may possibly cause a block which has belonged to a particular light source region so far to deviate from that light source region, with the danger that such an abrupt binary change may possibly bring about an unstable white balance.
The present invention was conceived in order to solve this problem. It is therefore the object of the present invention to provide an auto white balancing apparatus ensuring a stabilized white balance adjustment.
According to an aspect of the present invention there is provided an auto white balancing apparatus comprising block split means for splitting an image to be subjected to white balance processing into a plurality of blocks; representative color calculating means which for each split block, derives a representative color of the each block on the basis of pixel values within the each block; block reliability estimating means which for the each block and for each light source assumed, determines the distance between color difference components of the color of a white object under the each light source and color difference components of the representative color of the each block, to thereby estimate a reliability with which the each light source lights a scene of the each block on the basis of the distances; light source contribution component estimating means which for each light source, weights and averages the representative color of each block in accordance with the reliability of the each light source in each block, to thereby estimate components of contribution of each light source to the entire image; total reliability estimating means which for each light source, totals up the reliability of each light source in each block over all blocks contained within the image, to thereby estimate the reliability of each light source upon the entire image; lighting color estimating means for weighting and averaging components of contribution of each light source to the entire image estimated by the light source contribution component estimating means, in accordance with the reliability of each light source in the entire image estimated by the total reliability estimating means, to thereby estimate the color of lighting which lights the scene of the entire image; and white balancing means for executing white balance processing of each pixel of the image so as to nullify the lighting color estimated.
This apparatus performs the white balance adjustment using the reliability obtained from the distance between the color difference of the block representative color and the typical color difference of each light source, in lieu of using the result of binary discrimination of whether each optical region contains an average value of the color differences of blocks. The distance between the two color difference values are given as continuous values. The white balance adjustment processing in accordance with the present invention thus enables the behavior of the white balance to continuously follow any change of scenes photographed, achieving a smoother white balance adjustment than the prior art making adjustment based on the result of binary discrimination.
Preferably, the apparatus of the present invention further comprises means for modifying the reliability estimated by the block reliability estimating means, in accordance with luminance components of the representative color of the each block.
Different brightness of scenes offers different degree of reflection of lighting color upon the colors of those scenes. This aspect enables the reliability with which each light source lights the scene to be modified in response to the brightness, i.e., luminance of the scene, whereby improvement is achieved in the accuracy of estimation of the lighting color and, as the result of this, improvement is also achieved in the accuracy of the white balance adjustment.
In this aspect, modification of the reliability may be made using a function prepared separately for each light source so that the reliability with which each light source lights the scene can be modified utilizing knowledge about the brightness of each light source. Furthermore, the function for use in the modification may be a continuous function whose value varies continuously with respect to the luminance so that a smooth white balance adjustment can be realized.
According to another aspect of the present invention, the direct sunlight in the daytime and the shade-light in the daytime are distinguished from each other as different light sources whereby it is possible to provide a flexible white balance control even though the image contains both the portions subjected to direct sunlight and the portions in the shade.